function pi = pi_i(pm,x,e,p,w,r)

    pi = (1-pm.rho./pm.theta(r)).*p.*x.*e.*l_i(pm,x,e,p,w,r).^pm.rho;

end
